package com.cty._01_Base._02_Singleton;

/**
 * @Auther: cty
 * @Date: 2020/6/25 9:17
 * @Description: 测试单例模式
 * @version: 1.0
 */
public class SingletonApp {
    public static void main(String[] args) {
        System.out.println(Singleton01.getInstance());
        System.out.println(Singleton01.getInstance());

        System.out.println(Singleton02.getInstance());
        System.out.println(Singleton02.getInstance());

        System.out.println(Singleton03.getInstance());
        System.out.println(Singleton03.getInstance());

        System.out.println(Singleton04.INSTANCE == Singleton04.INSTANCE);

        System.out.println(Singleton05.getInstance());
        System.out.println(Singleton05.getInstance());

    }  // end main()
}  // end SingletonApp{}

/**
 * com.cty.A_Base.InterviewQuestion02.Singleton01@1cb52ae
 * com.cty.A_Base.InterviewQuestion02.Singleton01@1cb52ae
 * com.cty.A_Base.InterviewQuestion02.Singleton02@1b446d1
 * com.cty.A_Base.InterviewQuestion02.Singleton02@1b446d1
 * com.cty.A_Base.InterviewQuestion02.Singleton03@15575e0
 * com.cty.A_Base.InterviewQuestion02.Singleton03@15575e0
 * true
 * com.cty.A_Base.InterviewQuestion02.Singleton05@bac9b9
 * com.cty.A_Base.InterviewQuestion02.Singleton05@bac9b9
 */
